package networkcontroller.packet;

import networkcontroller.xml.XMLResult;

import dataTypes.File;

/**
 * class for result packet - conatins search results
 * 
 * @author maciek
 * 
 */
public class ResultPacket extends Packet
{
	/**
	 * 
	 * @param host
	 *            destination host
	 * @param port
	 *            destination port
	 * @param id
	 *            id of search which the result is connected with
	 * @param fileList
	 *            list of files which are results
	 */
	public ResultPacket(String host, int port, int id, Iterable<File> fileList)
	{
		super(true, false);
		type = Packet.RESULT_CODE;
		xml = new XMLResult(host, port, id, fileList);
		createPacket();
	}
}
